#!/bin/dash

baseuri=http://phpjs.org/packages/download/
vers=3.21
for f in "2679 php.default.commonjs.min.js" \
         "2680 php.default.commonjs.pack.js" \
         "306  php.default.js" \
         "308  php.default.min.js" \
         "307  php.default.namespaced.min.js" \
         "309  php.default.namespaced.pack.js" \
         "310  php.default.pack.js"
do
    set -- $f
    base=${2%.js}
    name="$base.$vers.js"
    title="PHP.js Default $vers ${base#php.default.}"
    echo "Checking $name $title"
    [ -f "$name" ] || curl -Lso "$name" "$baseuri/$1/name:$2"
    [ -f "$name" ] && checksums add "$title" "$name"
done
# vim:se sts=4 sw=4 et ft=sh:
